package com.rapid.maintenance.ui.activity.quickpurchase;

import android.content.Intent;
import android.text.TextUtils;
import android.widget.EditText;

import com.blankj.utilcode.util.ToastUtils;
import com.rapid.maintenance.R;
import com.rapid.maintenance.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;


public class QuickPurchaseMainActivity extends BaseActivity {
    @BindView(R.id.et_content)
    EditText etContent;

    @Override
    protected int provideRootLayout() {
        return R.layout.activity_quick_purchase_main;
    }

    @Override
    protected void init() {
        setTitle("一键采购商城");
        setStatusBarColor(0xFF016DB6);
        setToolBarColor(0xFF016DB6);
    }

    @OnClick(R.id.tv_search)
    public void onViewClicked() {
        if (TextUtils.isEmpty(etContent.getText())) {
            ToastUtils.showShort("请输入搜索内容");
        } else {
            startActivity(QuickPurchaseResultActivity.class, new Intent().putExtra("searchKey", etContent.getText().toString()));
        }
    }
}
